<template>
	<div class="p-5">
		<AButton type="primary" @click="openBaseModal()">打开弹框</AButton>
		<BaseModal @register="register"></BaseModal>
	</div>
</template>

<script lang="ts" setup>
	import { useModalOut } from '@zm-pkg/ui'
	import BaseModal from './components/BaseModal.vue';

	// 注册弹框
	const [register, { openModal }] = useModalOut()


	function openBaseModal() {
		openModal({
			key: '我是传入的参数1'
		}, (res) => {
			console.log( '我是弹框关闭后返回的参数', res )
		})
	}

</script>
